package com.hpu.servlet;


import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hpu.entity.Menu;
import com.hpu.entity.Order;
import com.hpu.service.MenuCommentService;

public class MenuCommentServlet extends HttpServlet {

	/**
	 * 默认序列化ID
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		MenuCommentService mcs = new MenuCommentService();
		List<Menu> menuList = mcs.findAllMenu();
		List<Order> orderList = mcs.findAllOrders();
		
		request.setAttribute("menuList", menuList);
		request.setAttribute("orderList", orderList);
		request.getRequestDispatcher("/WEB-INF/views/menucomment.jsp").forward(request, response);
	}
	
	
}
